{% extends "public/layout.html" %}

{% block breadcrumb %}
     <ol class="breadcrumb">
        <li>
            <a href="{% url 'index' %}">仪表盘</a>
        </li>
         <li>
             <a>任务管理</a>
         </li>
        <li class="active">
            <strong>添加任务</strong>
        </li>
    </ol>
{% endblock %}

{% block body %}
    <div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5> 增加任务 </h5>
                </div>

                <div class="ibox-content">
                  
                  <form method="post" id="autoTaskForm" action="" class="form-horizontal" enctype="multipart/form-data" autocomplete="off">
                    {% if errmsg %}
                        <div class="alert alert-danger alert-dismissable">
                            <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
                            {{ errmsg | safe }}
                        </div> 
                    {% endif %}

                        <div class="form-group"><label class="col-sm-2 control-label">任务名称：</label>
                            <div class="col-sm-8">
                                <input type="text" name ="name" id="task_name" class="form-control" value="" placeholder="任务名称" />
                                {% for error in forms.name.errors %}<span style="color:red">{{ error }}</span>{% endfor %}
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group"><label class="col-sm-2 control-label">Playbook：</label>
                            <div class="col-sm-8">
                                 <input type="file" name="playbook" id="playbook" placeholder="Playbook">
                                {% for error in forms.playbook.errors %}<span style="color:red">{{ error }}</span>{% endfor %}
                            </div>
                        </div>
            
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                             <div class="col-sm-4 col-sm-offset-2">
                                <button type="button" class="btn btn-white">关闭</button>
                                <button type="submit" class="btn btn-primary btn-add">添加任务</button>
                            </div>
                        </div>
                 </form>

                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
{% block js %}
{% endblock %}
